package cn.ibizlab.odoo.service.odoo_sale.dto;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import cn.ibizlab.odoo.core.odoo_sale.valuerule.anno.sale_advance_payment_inv.*;
import cn.ibizlab.odoo.core.odoo_sale.domain.Sale_advance_payment_inv;
import org.springframework.cglib.beans.BeanCopier;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 服务DTO对象[Sale_advance_payment_invDTO]
 */
public class Sale_advance_payment_invDTO implements Serializable {

	private static final long serialVersionUID = 1L;

    /**
     * 属性 [DEPOSIT_TAXES_ID]
     *
     */
    @Sale_advance_payment_invDeposit_taxes_idDefault(info = "默认规则")
    private String deposit_taxes_id;

    @JsonIgnore
    private boolean deposit_taxes_idDirtyFlag;

    /**
     * 属性 [AMOUNT]
     *
     */
    @Sale_advance_payment_invAmountDefault(info = "默认规则")
    private Double amount;

    @JsonIgnore
    private boolean amountDirtyFlag;

    /**
     * 属性 [COUNT]
     *
     */
    @Sale_advance_payment_invCountDefault(info = "默认规则")
    private Integer count;

    @JsonIgnore
    private boolean countDirtyFlag;

    /**
     * 属性 [CREATE_DATE]
     *
     */
    @Sale_advance_payment_invCreate_dateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp create_date;

    @JsonIgnore
    private boolean create_dateDirtyFlag;

    /**
     * 属性 [__LAST_UPDATE]
     *
     */
    @Sale_advance_payment_inv__last_updateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp __last_update;

    @JsonIgnore
    private boolean __last_updateDirtyFlag;

    /**
     * 属性 [WRITE_DATE]
     *
     */
    @Sale_advance_payment_invWrite_dateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp write_date;

    @JsonIgnore
    private boolean write_dateDirtyFlag;

    /**
     * 属性 [ADVANCE_PAYMENT_METHOD]
     *
     */
    @Sale_advance_payment_invAdvance_payment_methodDefault(info = "默认规则")
    private String advance_payment_method;

    @JsonIgnore
    private boolean advance_payment_methodDirtyFlag;

    /**
     * 属性 [ID]
     *
     */
    @Sale_advance_payment_invIdDefault(info = "默认规则")
    private Integer id;

    @JsonIgnore
    private boolean idDirtyFlag;

    /**
     * 属性 [DISPLAY_NAME]
     *
     */
    @Sale_advance_payment_invDisplay_nameDefault(info = "默认规则")
    private String display_name;

    @JsonIgnore
    private boolean display_nameDirtyFlag;

    /**
     * 属性 [DEPOSIT_ACCOUNT_ID_TEXT]
     *
     */
    @Sale_advance_payment_invDeposit_account_id_textDefault(info = "默认规则")
    private String deposit_account_id_text;

    @JsonIgnore
    private boolean deposit_account_id_textDirtyFlag;

    /**
     * 属性 [PRODUCT_ID_TEXT]
     *
     */
    @Sale_advance_payment_invProduct_id_textDefault(info = "默认规则")
    private String product_id_text;

    @JsonIgnore
    private boolean product_id_textDirtyFlag;

    /**
     * 属性 [WRITE_UID_TEXT]
     *
     */
    @Sale_advance_payment_invWrite_uid_textDefault(info = "默认规则")
    private String write_uid_text;

    @JsonIgnore
    private boolean write_uid_textDirtyFlag;

    /**
     * 属性 [CREATE_UID_TEXT]
     *
     */
    @Sale_advance_payment_invCreate_uid_textDefault(info = "默认规则")
    private String create_uid_text;

    @JsonIgnore
    private boolean create_uid_textDirtyFlag;

    /**
     * 属性 [PRODUCT_ID]
     *
     */
    @Sale_advance_payment_invProduct_idDefault(info = "默认规则")
    private Integer product_id;

    @JsonIgnore
    private boolean product_idDirtyFlag;

    /**
     * 属性 [CREATE_UID]
     *
     */
    @Sale_advance_payment_invCreate_uidDefault(info = "默认规则")
    private Integer create_uid;

    @JsonIgnore
    private boolean create_uidDirtyFlag;

    /**
     * 属性 [WRITE_UID]
     *
     */
    @Sale_advance_payment_invWrite_uidDefault(info = "默认规则")
    private Integer write_uid;

    @JsonIgnore
    private boolean write_uidDirtyFlag;

    /**
     * 属性 [DEPOSIT_ACCOUNT_ID]
     *
     */
    @Sale_advance_payment_invDeposit_account_idDefault(info = "默认规则")
    private Integer deposit_account_id;

    @JsonIgnore
    private boolean deposit_account_idDirtyFlag;


    /**
     * 获取 [DEPOSIT_TAXES_ID]
     */
    @JsonProperty("deposit_taxes_id")
    public String getDeposit_taxes_id(){
        return deposit_taxes_id ;
    }

    /**
     * 设置 [DEPOSIT_TAXES_ID]
     */
    @JsonProperty("deposit_taxes_id")
    public void setDeposit_taxes_id(String  deposit_taxes_id){
        this.deposit_taxes_id = deposit_taxes_id ;
        this.deposit_taxes_idDirtyFlag = true ;
    }

    /**
     * 获取 [DEPOSIT_TAXES_ID]脏标记
     */
    @JsonIgnore
    public boolean getDeposit_taxes_idDirtyFlag(){
        return deposit_taxes_idDirtyFlag ;
    }

    /**
     * 获取 [AMOUNT]
     */
    @JsonProperty("amount")
    public Double getAmount(){
        return amount ;
    }

    /**
     * 设置 [AMOUNT]
     */
    @JsonProperty("amount")
    public void setAmount(Double  amount){
        this.amount = amount ;
        this.amountDirtyFlag = true ;
    }

    /**
     * 获取 [AMOUNT]脏标记
     */
    @JsonIgnore
    public boolean getAmountDirtyFlag(){
        return amountDirtyFlag ;
    }

    /**
     * 获取 [COUNT]
     */
    @JsonProperty("count")
    public Integer getCount(){
        return count ;
    }

    /**
     * 设置 [COUNT]
     */
    @JsonProperty("count")
    public void setCount(Integer  count){
        this.count = count ;
        this.countDirtyFlag = true ;
    }

    /**
     * 获取 [COUNT]脏标记
     */
    @JsonIgnore
    public boolean getCountDirtyFlag(){
        return countDirtyFlag ;
    }

    /**
     * 获取 [CREATE_DATE]
     */
    @JsonProperty("create_date")
    public Timestamp getCreate_date(){
        return create_date ;
    }

    /**
     * 设置 [CREATE_DATE]
     */
    @JsonProperty("create_date")
    public void setCreate_date(Timestamp  create_date){
        this.create_date = create_date ;
        this.create_dateDirtyFlag = true ;
    }

    /**
     * 获取 [CREATE_DATE]脏标记
     */
    @JsonIgnore
    public boolean getCreate_dateDirtyFlag(){
        return create_dateDirtyFlag ;
    }

    /**
     * 获取 [__LAST_UPDATE]
     */
    @JsonProperty("__last_update")
    public Timestamp get__last_update(){
        return __last_update ;
    }

    /**
     * 设置 [__LAST_UPDATE]
     */
    @JsonProperty("__last_update")
    public void set__last_update(Timestamp  __last_update){
        this.__last_update = __last_update ;
        this.__last_updateDirtyFlag = true ;
    }

    /**
     * 获取 [__LAST_UPDATE]脏标记
     */
    @JsonIgnore
    public boolean get__last_updateDirtyFlag(){
        return __last_updateDirtyFlag ;
    }

    /**
     * 获取 [WRITE_DATE]
     */
    @JsonProperty("write_date")
    public Timestamp getWrite_date(){
        return write_date ;
    }

    /**
     * 设置 [WRITE_DATE]
     */
    @JsonProperty("write_date")
    public void setWrite_date(Timestamp  write_date){
        this.write_date = write_date ;
        this.write_dateDirtyFlag = true ;
    }

    /**
     * 获取 [WRITE_DATE]脏标记
     */
    @JsonIgnore
    public boolean getWrite_dateDirtyFlag(){
        return write_dateDirtyFlag ;
    }

    /**
     * 获取 [ADVANCE_PAYMENT_METHOD]
     */
    @JsonProperty("advance_payment_method")
    public String getAdvance_payment_method(){
        return advance_payment_method ;
    }

    /**
     * 设置 [ADVANCE_PAYMENT_METHOD]
     */
    @JsonProperty("advance_payment_method")
    public void setAdvance_payment_method(String  advance_payment_method){
        this.advance_payment_method = advance_payment_method ;
        this.advance_payment_methodDirtyFlag = true ;
    }

    /**
     * 获取 [ADVANCE_PAYMENT_METHOD]脏标记
     */
    @JsonIgnore
    public boolean getAdvance_payment_methodDirtyFlag(){
        return advance_payment_methodDirtyFlag ;
    }

    /**
     * 获取 [ID]
     */
    @JsonProperty("id")
    public Integer getId(){
        return id ;
    }

    /**
     * 设置 [ID]
     */
    @JsonProperty("id")
    public void setId(Integer  id){
        this.id = id ;
        this.idDirtyFlag = true ;
    }

    /**
     * 获取 [ID]脏标记
     */
    @JsonIgnore
    public boolean getIdDirtyFlag(){
        return idDirtyFlag ;
    }

    /**
     * 获取 [DISPLAY_NAME]
     */
    @JsonProperty("display_name")
    public String getDisplay_name(){
        return display_name ;
    }

    /**
     * 设置 [DISPLAY_NAME]
     */
    @JsonProperty("display_name")
    public void setDisplay_name(String  display_name){
        this.display_name = display_name ;
        this.display_nameDirtyFlag = true ;
    }

    /**
     * 获取 [DISPLAY_NAME]脏标记
     */
    @JsonIgnore
    public boolean getDisplay_nameDirtyFlag(){
        return display_nameDirtyFlag ;
    }

    /**
     * 获取 [DEPOSIT_ACCOUNT_ID_TEXT]
     */
    @JsonProperty("deposit_account_id_text")
    public String getDeposit_account_id_text(){
        return deposit_account_id_text ;
    }

    /**
     * 设置 [DEPOSIT_ACCOUNT_ID_TEXT]
     */
    @JsonProperty("deposit_account_id_text")
    public void setDeposit_account_id_text(String  deposit_account_id_text){
        this.deposit_account_id_text = deposit_account_id_text ;
        this.deposit_account_id_textDirtyFlag = true ;
    }

    /**
     * 获取 [DEPOSIT_ACCOUNT_ID_TEXT]脏标记
     */
    @JsonIgnore
    public boolean getDeposit_account_id_textDirtyFlag(){
        return deposit_account_id_textDirtyFlag ;
    }

    /**
     * 获取 [PRODUCT_ID_TEXT]
     */
    @JsonProperty("product_id_text")
    public String getProduct_id_text(){
        return product_id_text ;
    }

    /**
     * 设置 [PRODUCT_ID_TEXT]
     */
    @JsonProperty("product_id_text")
    public void setProduct_id_text(String  product_id_text){
        this.product_id_text = product_id_text ;
        this.product_id_textDirtyFlag = true ;
    }

    /**
     * 获取 [PRODUCT_ID_TEXT]脏标记
     */
    @JsonIgnore
    public boolean getProduct_id_textDirtyFlag(){
        return product_id_textDirtyFlag ;
    }

    /**
     * 获取 [WRITE_UID_TEXT]
     */
    @JsonProperty("write_uid_text")
    public String getWrite_uid_text(){
        return write_uid_text ;
    }

    /**
     * 设置 [WRITE_UID_TEXT]
     */
    @JsonProperty("write_uid_text")
    public void setWrite_uid_text(String  write_uid_text){
        this.write_uid_text = write_uid_text ;
        this.write_uid_textDirtyFlag = true ;
    }

    /**
     * 获取 [WRITE_UID_TEXT]脏标记
     */
    @JsonIgnore
    public boolean getWrite_uid_textDirtyFlag(){
        return write_uid_textDirtyFlag ;
    }

    /**
     * 获取 [CREATE_UID_TEXT]
     */
    @JsonProperty("create_uid_text")
    public String getCreate_uid_text(){
        return create_uid_text ;
    }

    /**
     * 设置 [CREATE_UID_TEXT]
     */
    @JsonProperty("create_uid_text")
    public void setCreate_uid_text(String  create_uid_text){
        this.create_uid_text = create_uid_text ;
        this.create_uid_textDirtyFlag = true ;
    }

    /**
     * 获取 [CREATE_UID_TEXT]脏标记
     */
    @JsonIgnore
    public boolean getCreate_uid_textDirtyFlag(){
        return create_uid_textDirtyFlag ;
    }

    /**
     * 获取 [PRODUCT_ID]
     */
    @JsonProperty("product_id")
    public Integer getProduct_id(){
        return product_id ;
    }

    /**
     * 设置 [PRODUCT_ID]
     */
    @JsonProperty("product_id")
    public void setProduct_id(Integer  product_id){
        this.product_id = product_id ;
        this.product_idDirtyFlag = true ;
    }

    /**
     * 获取 [PRODUCT_ID]脏标记
     */
    @JsonIgnore
    public boolean getProduct_idDirtyFlag(){
        return product_idDirtyFlag ;
    }

    /**
     * 获取 [CREATE_UID]
     */
    @JsonProperty("create_uid")
    public Integer getCreate_uid(){
        return create_uid ;
    }

    /**
     * 设置 [CREATE_UID]
     */
    @JsonProperty("create_uid")
    public void setCreate_uid(Integer  create_uid){
        this.create_uid = create_uid ;
        this.create_uidDirtyFlag = true ;
    }

    /**
     * 获取 [CREATE_UID]脏标记
     */
    @JsonIgnore
    public boolean getCreate_uidDirtyFlag(){
        return create_uidDirtyFlag ;
    }

    /**
     * 获取 [WRITE_UID]
     */
    @JsonProperty("write_uid")
    public Integer getWrite_uid(){
        return write_uid ;
    }

    /**
     * 设置 [WRITE_UID]
     */
    @JsonProperty("write_uid")
    public void setWrite_uid(Integer  write_uid){
        this.write_uid = write_uid ;
        this.write_uidDirtyFlag = true ;
    }

    /**
     * 获取 [WRITE_UID]脏标记
     */
    @JsonIgnore
    public boolean getWrite_uidDirtyFlag(){
        return write_uidDirtyFlag ;
    }

    /**
     * 获取 [DEPOSIT_ACCOUNT_ID]
     */
    @JsonProperty("deposit_account_id")
    public Integer getDeposit_account_id(){
        return deposit_account_id ;
    }

    /**
     * 设置 [DEPOSIT_ACCOUNT_ID]
     */
    @JsonProperty("deposit_account_id")
    public void setDeposit_account_id(Integer  deposit_account_id){
        this.deposit_account_id = deposit_account_id ;
        this.deposit_account_idDirtyFlag = true ;
    }

    /**
     * 获取 [DEPOSIT_ACCOUNT_ID]脏标记
     */
    @JsonIgnore
    public boolean getDeposit_account_idDirtyFlag(){
        return deposit_account_idDirtyFlag ;
    }



    public Sale_advance_payment_inv toDO() {
        Sale_advance_payment_inv srfdomain = new Sale_advance_payment_inv();
        if(getDeposit_taxes_idDirtyFlag())
            srfdomain.setDeposit_taxes_id(deposit_taxes_id);
        if(getAmountDirtyFlag())
            srfdomain.setAmount(amount);
        if(getCountDirtyFlag())
            srfdomain.setCount(count);
        if(getCreate_dateDirtyFlag())
            srfdomain.setCreate_date(create_date);
        if(get__last_updateDirtyFlag())
            srfdomain.set__last_update(__last_update);
        if(getWrite_dateDirtyFlag())
            srfdomain.setWrite_date(write_date);
        if(getAdvance_payment_methodDirtyFlag())
            srfdomain.setAdvance_payment_method(advance_payment_method);
        if(getIdDirtyFlag())
            srfdomain.setId(id);
        if(getDisplay_nameDirtyFlag())
            srfdomain.setDisplay_name(display_name);
        if(getDeposit_account_id_textDirtyFlag())
            srfdomain.setDeposit_account_id_text(deposit_account_id_text);
        if(getProduct_id_textDirtyFlag())
            srfdomain.setProduct_id_text(product_id_text);
        if(getWrite_uid_textDirtyFlag())
            srfdomain.setWrite_uid_text(write_uid_text);
        if(getCreate_uid_textDirtyFlag())
            srfdomain.setCreate_uid_text(create_uid_text);
        if(getProduct_idDirtyFlag())
            srfdomain.setProduct_id(product_id);
        if(getCreate_uidDirtyFlag())
            srfdomain.setCreate_uid(create_uid);
        if(getWrite_uidDirtyFlag())
            srfdomain.setWrite_uid(write_uid);
        if(getDeposit_account_idDirtyFlag())
            srfdomain.setDeposit_account_id(deposit_account_id);

        return srfdomain;
    }

    public void fromDO(Sale_advance_payment_inv srfdomain) {
        if(srfdomain == null )
          return ;
        if(srfdomain.getDeposit_taxes_idDirtyFlag())
            this.setDeposit_taxes_id(srfdomain.getDeposit_taxes_id());
        if(srfdomain.getAmountDirtyFlag())
            this.setAmount(srfdomain.getAmount());
        if(srfdomain.getCountDirtyFlag())
            this.setCount(srfdomain.getCount());
        if(srfdomain.getCreate_dateDirtyFlag())
            this.setCreate_date(srfdomain.getCreate_date());
        if(srfdomain.get__last_updateDirtyFlag())
            this.set__last_update(srfdomain.get__last_update());
        if(srfdomain.getWrite_dateDirtyFlag())
            this.setWrite_date(srfdomain.getWrite_date());
        if(srfdomain.getAdvance_payment_methodDirtyFlag())
            this.setAdvance_payment_method(srfdomain.getAdvance_payment_method());
        if(srfdomain.getIdDirtyFlag())
            this.setId(srfdomain.getId());
        if(srfdomain.getDisplay_nameDirtyFlag())
            this.setDisplay_name(srfdomain.getDisplay_name());
        if(srfdomain.getDeposit_account_id_textDirtyFlag())
            this.setDeposit_account_id_text(srfdomain.getDeposit_account_id_text());
        if(srfdomain.getProduct_id_textDirtyFlag())
            this.setProduct_id_text(srfdomain.getProduct_id_text());
        if(srfdomain.getWrite_uid_textDirtyFlag())
            this.setWrite_uid_text(srfdomain.getWrite_uid_text());
        if(srfdomain.getCreate_uid_textDirtyFlag())
            this.setCreate_uid_text(srfdomain.getCreate_uid_text());
        if(srfdomain.getProduct_idDirtyFlag())
            this.setProduct_id(srfdomain.getProduct_id());
        if(srfdomain.getCreate_uidDirtyFlag())
            this.setCreate_uid(srfdomain.getCreate_uid());
        if(srfdomain.getWrite_uidDirtyFlag())
            this.setWrite_uid(srfdomain.getWrite_uid());
        if(srfdomain.getDeposit_account_idDirtyFlag())
            this.setDeposit_account_id(srfdomain.getDeposit_account_id());

    }

    public List<Sale_advance_payment_invDTO> fromDOPage(List<Sale_advance_payment_inv> poPage)   {
        if(poPage == null)
            return null;
        List<Sale_advance_payment_invDTO> dtos=new ArrayList<Sale_advance_payment_invDTO>();
        for(Sale_advance_payment_inv domain : poPage) {
            Sale_advance_payment_invDTO dto = new Sale_advance_payment_invDTO();
            dto.fromDO(domain);
            dtos.add(dto);
        }
        return dtos;
    }
}

